package com.example.gateway;

import com.example.demo.common.GrayLoadBalancerConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClients;

/**
 * 网关中也要设置 自定义的负载均衡器
 */
@SpringBootApplication
@LoadBalancerClients(defaultConfiguration =
        GrayLoadBalancerConfig.class)
public class GatewayApplication {

    public static void main(String[] args) {
        SpringApplication.run(GatewayApplication.class, args);
    }

}
